#include <stdio.h>
#include <assert.h>

char* my_strcpy(char* dest,const char*src) 
{
	assert(dest && src);
	char* ret = dest;
	while (*dest++=*src++);
	return ret;
}

/*void main()
{
	char arr1[] = "abcdef";
	char arr2[20];
	my_strcpy(arr2, arr1);
	printf("%s\n",arr2);
}*/
char* my_strcat(char* dest,char* src) 
{
	assert(dest&&src);
	char* ret = dest;
	while (*dest != '\0') 
	{
		dest++;
	}
	while (*dest++ = *src++);
	return ret;
}
/*void main() 
{
	char a1[20] = "Hello ";
	my_strcat(a1,"World");
	printf("%s\n",a1);
}*/
int my_strcmp(const char* str1,const char* str2) 
{
	while (*str1 == *str2) 
	{
		if (*str1 == '\0')
			return 0;
		str1++;
		str2++;
	}
	return (*str1-*str2);
}
void main()
{
	char arr1[] = "abcd";
	char arr2[] = "abq";
	int ret=my_strcmp(arr1,arr2);
	if (ret > 0)
		printf(">\n");
	else if (ret < 0)
		printf("<\n");
	else
		printf("==\n");
}
